Security News
vlt Debuts New JavaScript Package Manager and Serverless Registry at NodeConf EU
vlt introduced its new package manager and a serverless registry this week, innovating in a space where npm has stagnated.
@smithy/eventstream-codec
Advanced tools
[![NPM version](https://img.shields.io/npm/v/@smithy/eventstream-codec/latest.svg)](https://www.npmjs.com/package/@smithy/eventstream-codec) [![NPM downloads](https://img.shields.io/npm/dm/@smithy/eventstream-codec.svg)](https://www.npmjs.com/package/@smi
@smithy/eventstream-codec is an npm package designed to handle the encoding and decoding of event streams. It is part of the Smithy framework, which is used for building SDKs and other tools for AWS services. This package is particularly useful for working with AWS services that use event streams, such as AWS Transcribe or AWS Kinesis.
Encoding Event Streams
This feature allows you to encode an event stream into a binary format. The code sample demonstrates how to create an event and encode it using the EventStreamMarshaller.
const { EventStreamMarshaller } = require('@smithy/eventstream-codec');
const marshaller = new EventStreamMarshaller();
const event = { headers: {}, body: Buffer.from('example data') };
const encoded = marshaller.marshall(event);
console.log(encoded);
Decoding Event Streams
This feature allows you to decode a binary event stream back into its original format. The code sample shows how to decode an encoded event using the EventStreamMarshaller.
const { EventStreamMarshaller } = require('@smithy/eventstream-codec');
const marshaller = new EventStreamMarshaller();
const encoded = Buffer.from('example encoded data');
const event = marshaller.unmarshall(encoded);
console.log(event);
The event-stream package is a toolkit for working with streams in Node.js. It provides a variety of utilities for creating and manipulating streams, including event streams. While it offers broader functionality than @smithy/eventstream-codec, it does not specifically focus on AWS event streams.
FAQs
[![NPM version](https://img.shields.io/npm/v/@smithy/eventstream-codec/latest.svg)](https://www.npmjs.com/package/@smithy/eventstream-codec) [![NPM downloads](https://img.shields.io/npm/dm/@smithy/eventstream-codec.svg)](https://www.npmjs.com/package/@smi
The npm package @smithy/eventstream-codec receives a total of 9,030,416 weekly downloads. As such, @smithy/eventstream-codec popularity was classified as popular.
We found that @smithy/eventstream-codec demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 2 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
vlt introduced its new package manager and a serverless registry this week, innovating in a space where npm has stagnated.
Security News
Research
The Socket Research Team uncovered a malicious Python package typosquatting the popular 'fabric' SSH library, silently exfiltrating AWS credentials from unsuspecting developers.
Security News
At its inaugural meeting, the JSR Working Group outlined plans for an open governance model and a roadmap to enhance JavaScript package management.